#ifndef FOLDERFAVORITESITEM_H
#define FOLDERFAVORITESITEM_H
#include "abstractfavoritesitem.h"
#include <QList>

namespace ExecTerminalImplNS
{
    class FolderFavoritesItem: public AbstractFavoritesItem
    {
    public:
        typedef QList<AbstractFavoritesItem*> ChildrenList;

    public:
        FolderFavoritesItem(const QString & aname, FolderFavoritesItem * prnt = 0);
        ~FolderFavoritesItem();
        bool isFolder()const;
        
        void appendChild(AbstractFavoritesItem *child);
        AbstractFavoritesItem *child(int number);

        int childCount()const;

        const ChildrenList & children()const { return theChildren; } 
        ChildrenList & children() { return theChildren; } 

        void readFromDataStream(QDataStream &);
        void writeToDataStream(QDataStream &)const;

    protected:
        friend class FavoritesCreator;
        FolderFavoritesItem(FolderFavoritesItem * prnt = 0);

    private:
        virtual QIcon provideIcon()const;

    private:
        ChildrenList theChildren;
    };

}

#endif
